<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id (主键)
 * @property integer $user_id 用户ID
 * @property integer $activity_id 活动ID
 * @property string $name 姓名
 * @property string $mobile 手机号
 * @property string $created_time 报名时间
 */
class UserActivity extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_user_activity';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    
    const STATUS_WAITING_START = 1;

    const STATUS_STARTING = 2;

    const STATUS_END = 3;

    const STATUS_CANCEL = 4;

    public static function getStatusText($status)
    {
        switch ($status) {
            case self::STATUS_WAITING_START:
                return '待开始';
            case self::STATUS_STARTING:
                return '进行中';
            case self::STATUS_END:
                return '已结束';
            case self::STATUS_CANCEL:
                return '已取消';
        }
    }
}
